<?php
/**
 * 行为日志记录
 *
 * @author Administrator
 */
class ActionModel extends CommonModel {
    
    /**
     * Log histories for an action.
     *
     * @param  int    $actionID
     * @param  array  $changes
     * @access public
     * @return void
     */
    public function logHistory($actionID, $changes)
    {
        if(!is_array($changes))
            return;
        foreach($changes as $change)
        {
            $change['action_id'] = $actionID;
            M('History')->add($change);
        }
    }
}
?>
